import request from '@/utils/request'

// 查询采购申请列表
export function listRequest(query) {
  return request({
    url: '/pms/request/list',
    method: 'get',
    params: query
  })
}

// 查询采购申请详细
export function getRequest(requestUuid) {
  return request({
    url: '/pms/request/' + requestUuid,
    method: 'get'
  })
}

// 新增采购申请
export function addRequest(data) {
  return request({
    url: '/pms/request',
    method: 'post',
    data: data
  })
}

// 修改采购申请
export function updateRequest(data) {
  return request({
    url: '/pms/request/update',
    method: 'put',
    data: data
  })
}

// 删除采购申请
export function delRequest(requestUuid) {
  return request({
    url: '/pms/request/' + requestUuid,
    method: 'delete'
  })
}

export function confirmRequest(data) {
  return request({
    url: '/pms/request/confirm',
    method: 'put',
    data: data
  })
}
